 #{extends 'main.html'/}
 %{
        _ACCOUNT_LIST = models.accounts.AccountConstant.DIC_ACCOUNT_LIST_NAME;
 }%
  <div class="row wrapper white-bg page-heading">
        <!-- <div class="wrapper wrapper-content animated fadeInRight"> -->
            <div class="row">
                <div class="col-md-12">
                    <div class="ibox float-e-margins">
                        <div class="ibox-title">
                            <h5>IP白名单新增</h5>
                        </div>
                        <div class="ibox-content">
                        #{form @security.IPTables.create(),method:'POST',id:'newForm',class:'form-horizontal'}
                            <div class="form-group form-inline ">
                                #{f.text_field 'tb.name',label:'名称',required:'true',maxlength:16 /}
                            </div>
                               <div class="form-group form-inline">
                                #{f.text_field 'tb.ip',label:'IP',required:'true' /}
                            </div>
                                
                                
                                <div class="form-group">
                                    <div class="col-sm-4 form-btn-area">
                                       #{f.button '保存',href:'javascript:submitForm();',class:"btn btn-primary" /}
                                       #{f.button '取消',href:@security.IPTables.index(),class:"btn btn-white"/}
                                    </div>
                                </div>
                           #{/form}
                        </div>
                    </div>
                </div>
            </div>
        </div>
       <script type="text/javascript">
       function submitForm(){
          $('#newForm').submit();    
       }
       </script> 